package ar.edu.itba.it.pdc.httpParser;

import ar.edu.itba.it.pdc.httpParser.exceptions.HttpBadRequestException;
import ar.edu.itba.it.pdc.httpParser.exceptions.HttpMethodNotSuportedException;
import ar.edu.itba.it.pdc.httpParser.exceptions.HttpVersionNotSuportedException;
import ar.edu.itba.it.pdc.httpParser.interfaces.Model;
import ar.edu.itba.it.pdc.httpParser.interfaces.Parser;
import ar.edu.itba.it.pdc.httpParser.models.HttpBody;
import ar.edu.itba.it.pdc.httpParser.models.Token;

public class ConnectionCloseBodyParser implements Parser {

	
	HttpBody model = new HttpBody();
	
	public ConnectionCloseBodyParser() {
	
	}
	
	@Override
	public Model getModel() {
		return model;
	}

	@Override
	public int parseToken(Token token)
			throws HttpMethodNotSuportedException, HttpBadRequestException,
			HttpVersionNotSuportedException {

		model.append(token);
		return -1;
	}
}
